<?php
/**
 * wangEditor编辑器
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019-03-28
 * Time: 下午 11:26
 */
namespace App;

class Editor extends Action
{
	public function __construct()
	{
		parent::__construct();
	}

	/**
	 * 上传编辑器图片
	 */
	public function uploadEditorImage()
	{
		load()->func('file');
		$_imgs = array();
		foreach($_FILES as $_k=>$_v){
			$_file = file_upload($_v,'image');
			$_imgs[] = tomedia($_file['path']);
		}
		$this->result(array('errno'=>0,'data'=>$_imgs));
	}
}